<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
           prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
           prefix="html" %>

<%@page import="com.sql.Sql" %>
<%@page import="java.util.List" %>
<html>
    <head>
        <meta http-equiv="Content-Type"
              content="text/html; charset=UTF-8">
        <title>Struts - Musica</title>
        <style type="text/css">
            @import "/musica/musica.css";
        </style>
    </head>
    <body>
        <%
        String idTema = request.getParameter("idTema");

        if (idTema == null) {
            String msg = "Ingreso incorrecto!";
            request.getSession().setAttribute("msg", msg);
            response.sendRedirect("mensaje.jsp");
        } else {
            Object[] fila = (Object[]) Sql.getFila(
                    "SELECT tema,duracion " +
                    "FROM temas WHERE idTema=" + idTema);
        %>
        <p>&nbsp;</p>
        <p class="titulo">Retirar Tema</p>
        <html:form action="logTema">
            <html:hidden property="accion" value="DEL" />
            <html:hidden property="idTema"
                         value="<%=idTema%>" />
            <p class="center">
                <table border="0">
                    <tr>
                        <td>Tema</td>
                        <td>
                            <html:text property="tema"
                                 value="<%=fila[0].toString()%>"
                                 readonly="true" size="30" />
                        </td>
                    </tr>
                    <tr>
                        <td>duraci&oacute;n (seg.)</td>
                        <td>
                            <html:text property="tema"
                                 value="<%=fila[1].toString()%>"
                                 readonly="true" size="30" />
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2"><br>
                            <html:submit value="Retirar" />
                        </td>
                    </tr>
                </table>
            </p>
        </html:form>

        <p class="center">
            <a href="/musica/portada.html">Home</a>
        </p>
        <%}%>
    </body>
</html>

